QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = GX-ISPTool
TEMPLATE = app

CONFIG += c++11

# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
    main.cpp \
    mainwindow.cpp \
    parsehex.cpp \
    usbthread.cpp

HEADERS += \
    hidapi/hidapi.h \
    mainwindow.h \
    parsehex.h \
    usbthread.h

FORMS += \
    mainwindow.ui

greaterThan(QT_MAJOR_VERSION,4){
TARGET_ARCH=$${QT_ARCH}
}else{
    TARGET_ARCH=$${QMAKE_HOST.arch}
}

contains(TARGET_ARCH, x86_64){
    message("64-bit")
    win32 {
        LIBS += -L$$_PRO_FILE_PWD_/hidapi/win32/x64  -lhidapi
    }

    unix:!macx {
        LIBS += -L$$_PRO_FILE_PWD_/hidapi/linux  -lhidapi
    }

    macx: {
        LIBS += $$_PRO_FILE_PWD_/hidapi/mac/libhidapi.0.12.0.dylib
    }
}else{
    message("32-bit")
    LIBS += -L$$_PRO_FILE_PWD_/hidapi/win32/x86  -lhidapi
}


RESOURCES += \
    qrc.qrc

DISTFILES += \
    logo.rc

RC_FILE += logo.rc
